<template>
	<view class="registration-form-container">
		<view class="list" v-for="item in list" :key="item._id">
			<view class="left">
				<view class="avatar">
					<image :src="item.user.avatar?item.user.avatar:'/static/logo.png'" mode=""></image>
				</view>
				<view class="name">
					{{item.name}}
				</view>
			</view>
			<view class="right" @click="goDetail(item)">
				查看详情
			</view>
		</view>
	</view>
</template>

<script>
	import {getEnrollInfo} from "../../ajax/api/qiye.js";
	export default {
		data() {
			return {
				current:1,
				pageSize:5,
				list:[], //报名表
			}
		},
		async onShow(){
			const res = await getEnrollInfo()
			this.list = res.rows;
			// #ifdef MP-WEIXIN
			if (wx.hideHomeButton) {
				wx.hideHomeButton();
			}
			// #endif
		},
		methods: {
			// 查看详情
			goDetail(item){
				this.$Router.push({
					name:"userForm",
					params:{
						item:JSON.stringify(item)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
@import "./css/registrationForm.scss";
</style>
